﻿@{
    ViewBag.Title = "";
}
@model DTcms.Model.site_oauth
<form id="form1" class="layui-form" url="SiteOauthSave?action=@ViewBag.action&id=@ViewBag.id">
    @Html.AntiForgeryToken()
    <!--导航栏-->
    <div class="pageheader">
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li><a href="../users/site_oauth_list" class="back"><i class="fa fa-mail-reply-all"></i> 返回列表页</a></li>
                <li><a href="javascript:;"><i class="iconfont icon-home1"></i> 首页</a> </li>
                <li><a href="javascript:;">会员设置</a> </li>
                <li><a href="javascript:;">OAuth列表</a> </li>
                <li><a href="javascript:;">编辑OAuth信息</a> </li>
            </ul>
        </div>
    </div>
    <!--/导航栏-->
    <!--内容-->
    <div class="layui-fluid">
        <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title" id="floatHead">
                <li class="layui-this">编辑OAuth信息</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">所属站点</label>
                        <div class="layui-input-block">
                            <select class="select" name="site_id" url="/webapi/siteJson" child="oauth_id" childDataPath="/webapi/oauthJson?oauth_id=@Model.oauth_id" selectValue="@Model.site_id" promtion="请选择站点..." datatype="*" errormsg="请选择所属站点！" sucmsg="">
                                <option value="">请选择站点...</option>
                            </select>
                            <span class="Validform_checktip">*选择站点后查询未安装应用</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">所属应用</label>
                        <div class="layui-input-block">
                            <select class="select" name="oauth_id" selectValue="@Model.oauth_id" promtion="请选择平台..." datatype="*" errormsg="请选择平台！" sucmsg="">
                                <option value="">请选择平台...</option>
                            </select>
                            <span class="Validform_checktip">*请先选择站点后显示应用</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序数字</label>
                        <div class="layui-input-block">
                            @Html.TextBox("sort_id", Model.sort_id, new { @class = "input small", datatype = "n", sucmsg = " " })
                            <span class="Validform_checktip">*数字，越小越向前</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题名称</label>
                        <div class="layui-input-block">
                            @Html.TextBox("title", Model.title, new { @class = "input normal", datatype = "*2-100", sucmsg = " " })
                            <span class="Validform_checktip">*网站上面显示的标题，100字符内</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">API Key</label>
                        <div class="layui-input-block">
                            @Html.TextBox("app_id", Model.app_id, new { @class = "input normal", datatype = "*", sucmsg = " " })
                            <span class="Validform_checktip">*QQ互联请填写APP ID</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">Secret Key</label>
                        <div class="layui-input-block">
                            @Html.TextBox("app_key", Model.app_key, new { @class = "input normal", datatype = "*", sucmsg = " " })
                            <span class="Validform_checktip">*QQ互联请填写KEY</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap">
            <button class="layui-btn icon-btn" id="btnSubmit"><i class="layui-icon layui-icon-ok"></i>提交保存</button>
            <button class="layui-btn layui-btn-warm icon-btn" name="btnReturn" onclick="javascript:history.back(-1);"><i class="layui-icon layui-icon-return"></i>返回上一页</button>
        </div>
    </div>
    <!--/工具栏-->
</form>
@section Scripts{
    <script type="text/javascript">
        layui.use(['jqueryform', 'cascadeSelect', 'validform', 'element'], function () {
            var cascadeSelect = layui.cascadeSelect, $ = layui.jquery;

            //初始化表单验证
            $("#form1").initValidform('#btnSubmit', 1);
            cascadeSelect.init('site_id', false);
        });
    </script>
}